package com.company.utils;

import com.company.service.BaseService;
import com.company.service.StartService;
import com.company.service.impl.*;

public class ServiceFactory {
    // 返回业务接口的实现类对象
    public static BaseService getService(String key){
        if ("start".equals(key)){
            return new StartServiceImpl();
        }else if ("login".equals(key)){
            return new LoginServiceImpl();
        }else if("regist".equals(key)){
            return new RegisterServiceImpl();
        }else if("type".equals(key)){
            return new GetNovelTypesServiceImpl();
        }else if("novel".equals(key)){
            return new GetNovelsServiceImpl();
        }
        return null;
    }
}
